<template>
  <div>
    <div class="logo">
      <img :src="web_logo" alt="" />
    </div>
    <input type="text" v-model="formData.username" placeholder="请输入登录账号" />
    <input type="text" v-model="formData.password" placeholder="请输入登录密码" />
    <div class="login">
      <button @click="login">点击登录</button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    // 站点名称
    web_name: {
      type: String,
      default: "HPAdmin",
    },
    // 站点LOGO
    web_logo: {
      type: String,
      default: "static/image/logo.png",
    },
  },
  data() {
    return {
      formData: {
        username: "",
        password: "",
      },
    };
  },
  methods: {
    // 登录token
    login() {
      this.$loginEvent.init({
        username: this.formData.username,
        password: this.formData.password,
      });
    },
  },
};
</script>

<style>
</style>